home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIS Performer 2.2 Friends Demo
/
SGI IRIS Performer 2.2 Friends Demo.iso
/
friends
/
openworlds
/
wrl
/
aliens.wrl
next >
Wrap
Text File
|
1997-11-22
|
16KB
|
562 lines
#VRML V2.0 utf8
#OpenWorlds Demo by Daniel Hunt
#email: st93vtzh@dunx1.ocs.drexel.edu
Viewpoint {
description "start"
position 0 10 60
orientation 1 0 0 -.3
}
Group { children
Inline { url "elgrid.wrl" }
}
DEF SpaceShip Transform {
translation 0 5 -40
children [
DEF ShipRing Transform {
scale 1 .15 1
children
Shape {
appearance Appearance {
material Material { diffuseColor .7 .7 1 }
}
geometry Sphere { radius 20 }
}
}
DEF ShipMiddle Transform {
scale 1 .4 1
children
Shape {
appearance Appearance {
material Material { diffuseColor .7 .8 1 }
}
geometry Sphere { radius 15 }
}
}
DEF ShipBubble Transform {
translation 0 5 0
children
Shape {
appearance Appearance {
material Material { diffuseColor .7 .95 1
transparency .4 }
}
geometry Sphere { radius 5 }
}
}
Transform {
translation 13 2 0
children
DEF Light1 Switch{
whichChoice 1
choice [
Shape {
appearance Appearance {
material Material { diffuseColor 0 0 1 }
}
geometry Sphere {}
}
Shape {
appearance Appearance {
material Material { diffuseColor 0 1 0 }
}
geometry Sphere {}
}
Shape {
appearance Appearance {
material Material { diffuseColor 1 0 0 }
}
geometry Sphere {}
}
]
}
}
Transform{
translation 0 2 13
children
DEF Light2 Switch{
whichChoice 1
choice [
Shape {
appearance Appearance {
material Material { diffuseColor 0 1 0 }
}
geometry Sphere {}
}
Shape {
appearance Appearance {
material Material { diffuseColor 1 0 0 }
}
geometry Sphere {}
}
Shape {
appearance Appearance {
material Material { diffuseColor 0 0 1 }
}
geometry Sphere {}
}
]
}
}
Transform{
translation -13 2 0
children
USE Light1
}
Transform{
translation 0 2 -13
children
USE Light2
}
]
}
DEF Alien1Move Transform {
children [
DEF Alien1Hit TouchSensor { }
DEF Alien1 Switch {
choice [
Shape {
appearance Appearance {
material Material{diffuseColor 1 1 1}
texture ImageTexture { url "alien2.rgba" }
}
geometry IndexedFaceSet {
coord Coordinate{
point [ -1 -2 0, 1 -2 0, 1 2 0, -1 2 0 ]
}
coordIndex [ 0 1 2 3 -1]
texCoord TextureCoordinate {point [0 0, 1 0, 1 1, 0 1] }
}
}
Shape {appearance Appearance {
material Material{diffuseColor 1 1 1}
texture ImageTexture { url "alien3.rgba" }}
geometry IndexedFaceSet { coord Coordinate{ point [ -1 -2 0,
1 -2 0, 1 2 0, -1 2 0 ] } coordIndex [ 0 1 2 3 -1]
texCoord TextureCoordinate {point [0 0, 1 0, 1 1, 0 1] }}
}
Shape {appearance Appearance {
material Material{diffuseColor 1 1 1}
texture ImageTexture { url "alien4.rgba" }}
geometry IndexedFaceSet { coord Coordinate{ point [ -1 -2 0,
1 -2 0, 1 2 0, -1 2 0 ] } coordIndex [ 0 1 2 3 -1]
texCoord TextureCoordinate {point [0 0, 1 0, 1 1, 0 1] }}
}
Shape {appearance Appearance {
material Material{diffuseColor 1 1 1}
texture ImageTexture { url "alienboom1.rgba" }}
geometry IndexedFaceSet { coord Coordinate{ point [ -1 -2 0,
1 -2 0, 1 2 0, -1 2 0 ] } coordIndex [ 0 1 2 3 -1]
texCoord TextureCoordinate {point [0 0, 1 0, 1 1, 0 1] }}
}
Shape {
appearance Appearance {
material Material{diffuseColor 1 1 1}
texture ImageTexture { url "alienboom2.rgba" }
}
geometry IndexedFaceSet {
coord Coordinate{
point [ -1 -2 0, 1 -2 0, 1 2 0, -1 2 0 ]
}
coordIndex [ 0 1 2 3 -1]
texCoord TextureCoordinate {point [0 0, 1 0, 1 1, 0 1] }
}
}
Shape {
appearance Appearance {
material Material{diffuseColor 1 1 1}
texture ImageTexture { url "alienboom3.rgba" }
}
geometry IndexedFaceSet {
coord Coordinate{
point [ -1 -2 0, 1 -2 0, 1 2 0, -1 2 0 ]
}
coordIndex [ 0 1 2 3 -1]
texCoord TextureCoordinate {point [0 0, 1 0, 1 1, 0 1] }
}
}
Shape {
appearance Appearance {
material Material{diffuseColor 1 1 1}
texture ImageTexture { url "alienboom4.rgba" }
}
geometry IndexedFaceSet {
coord Coordinate{
point [ -1 -2 0, 1 -2 0, 1 2 0, -1 2 0 ]
}
coordIndex [ 0 1 2 3 -1]
texCoord TextureCoordinate {point [0 0, 1 0, 1 1, 0 1] }
}
}
]
whichChoice 1
}
]
}
DEF Alien2Move Transform {
children [
DEF Alien2Hit TouchSensor { }
DEF Alien2 Switch {
choice [
Shape {
appearance Appearance {
material Material{diffuseColor 1 1 1}
texture ImageTexture { url "alien2.rgba" }
}
geometry IndexedFaceSet {
coord Coordinate{
point [ -1 -2 0, 1 -2 0, 1 2 0, -1 2 0 ]
}
coordIndex [ 0 1 2 3 -1]
texCoord TextureCoordinate {point [0 0, 1 0, 1 1, 0 1] }
}
}
Shape {appearance Appearance {
material Material{diffuseColor 1 1 1}
texture ImageTexture { url "alien3.rgba" }}
geometry IndexedFaceSet { coord Coordinate{ point [ -1 -2 0,
1 -2 0, 1 2 0, -1 2 0 ] } coordIndex [ 0 1 2 3 -1]
texCoord TextureCoordinate {point [0 0, 1 0, 1 1, 0 1] }}
}
Shape {appearance Appearance {
material Material{diffuseColor 1 1 1}
texture ImageTexture { url "alien4.rgba" }}
geometry IndexedFaceSet { coord Coordinate{ point [ -1 -2 0,
1 -2 0, 1 2 0, -1 2 0 ] } coordIndex [ 0 1 2 3 -1]
texCoord TextureCoordinate {point [0 0, 1 0, 1 1, 0 1] }}
}
Shape {appearance Appearance {
material Material{diffuseColor 1 1 1}
texture ImageTexture { url "alienboom1.rgba" }}
geometry IndexedFaceSet { coord Coordinate{ point [ -1 -2 0,
1 -2 0, 1 2 0, -1 2 0 ] } coordIndex [ 0 1 2 3 -1]
texCoord TextureCoordinate {point [0 0, 1 0, 1 1, 0 1] }}
}
Shape {
appearance Appearance {
material Material{diffuseColor 1 1 1}
texture ImageTexture { url "alienboom2.rgba" }
}
geometry IndexedFaceSet {
coord Coordinate{
point [ -1 -2 0, 1 -2 0, 1 2 0, -1 2 0 ]
}
coordIndex [ 0 1 2 3 -1]
texCoord TextureCoordinate {point [0 0, 1 0, 1 1, 0 1] }
}
}
Shape {
appearance Appearance {
material Material{diffuseColor 1 1 1}
texture ImageTexture { url "alienboom3.rgba" }
}
geometry IndexedFaceSet {
coord Coordinate{
point [ -1 -2 0, 1 -2 0, 1 2 0, -1 2 0 ]
}
coordIndex [ 0 1 2 3 -1]
texCoord TextureCoordinate {point [0 0, 1 0, 1 1, 0 1] }
}
}
Shape {
appearance Appearance {
material Material{diffuseColor 1 1 1}
texture ImageTexture { url "alienboom4.rgba" }
}
geometry IndexedFaceSet {
coord Coordinate{
point [ -1 -2 0, 1 -2 0, 1 2 0, -1 2 0 ]
}
coordIndex [ 0 1 2 3 -1]
texCoord TextureCoordinate {point [0 0, 1 0, 1 1, 0 1] }
}
}
]
whichChoice 1
}
]
}
DEF Alien3Move Transform {
children [
DEF Alien3Hit TouchSensor { }
DEF Alien3 Switch {
choice [
Shape {
appearance Appearance {
material Material{diffuseColor 1 1 1}
texture ImageTexture { url "alien2.rgba" }
}
geometry IndexedFaceSet {
coord Coordinate{
point [ -1 -2 0, 1 -2 0, 1 2 0, -1 2 0 ]
}
coordIndex [ 0 1 2 3 -1]
texCoord TextureCoordinate {point [0 0, 1 0, 1 1, 0 1] }
}
}
Shape {appearance Appearance {
material Material{diffuseColor 1 1 1}
texture ImageTexture { url "alien3.rgba" }}
geometry IndexedFaceSet { coord Coordinate{ point [ -1 -2 0,
1 -2 0, 1 2 0, -1 2 0 ] } coordIndex [ 0 1 2 3 -1]
texCoord TextureCoordinate {point [0 0, 1 0, 1 1, 0 1] }}
}
Shape {appearance Appearance {
material Material{diffuseColor 1 1 1}
texture ImageTexture { url "alien4.rgba" }}
geometry IndexedFaceSet { coord Coordinate{ point [ -1 -2 0,
1 -2 0, 1 2 0, -1 2 0 ] } coordIndex [ 0 1 2 3 -1]
texCoord TextureCoordinate {point [0 0, 1 0, 1 1, 0 1] }}
}
Shape {appearance Appearance {
material Material{diffuseColor 1 1 1}
texture ImageTexture { url "alienboom1.rgba" }}
geometry IndexedFaceSet { coord Coordinate{ point [ -1 -2 0,
1 -2 0, 1 2 0, -1 2 0 ] } coordIndex [ 0 1 2 3 -1]
texCoord TextureCoordinate {point [0 0, 1 0, 1 1, 0 1] }}
}
Shape {
appearance Appearance {
material Material{diffuseColor 1 1 1}
texture ImageTexture { url "alienboom2.rgba" }
}
geometry IndexedFaceSet {
coord Coordinate{
point [ -1 -2 0, 1 -2 0, 1 2 0, -1 2 0 ]
}
coordIndex [ 0 1 2 3 -1]
texCoord TextureCoordinate {point [0 0, 1 0, 1 1, 0 1] }
}
}
Shape {
appearance Appearance {
material Material{diffuseColor 1 1 1}
texture ImageTexture { url "alienboom3.rgba" }
}
geometry IndexedFaceSet {
coord Coordinate{
point [ -1 -2 0, 1 -2 0, 1 2 0, -1 2 0 ]
}
coordIndex [ 0 1 2 3 -1]
texCoord TextureCoordinate {point [0 0, 1 0, 1 1, 0 1] }
}
}
Shape {
appearance Appearance {
material Material{diffuseColor 1 1 1}
texture ImageTexture { url "alienboom4.rgba" }
}
geometry IndexedFaceSet {
coord Coordinate{
point [ -1 -2 0, 1 -2 0, 1 2 0, -1 2 0 ]
}
coordIndex [ 0 1 2 3 -1]
texCoord TextureCoordinate {point [0 0, 1 0, 1 1, 0 1] }
}
}
]
whichChoice 1
}
]
}
DEF Alien4Move Transform {
children [
DEF Alien4Hit TouchSensor { }
DEF Alien4 Switch {
choice [
Shape {
appearance Appearance {
material Material{diffuseColor 1 1 1}
texture ImageTexture { url "alien2.rgba" }
}
geometry IndexedFaceSet {
coord Coordinate{
point [ -1 -2 0, 1 -2 0, 1 2 0, -1 2 0 ]
}
coordIndex [ 0 1 2 3 -1]
texCoord TextureCoordinate {point [0 0, 1 0, 1 1, 0 1] }
}
}
Shape {appearance Appearance {
material Material{diffuseColor 1 1 1}
texture ImageTexture { url "alien3.rgba" }}
geometry IndexedFaceSet { coord Coordinate{ point [ -1 -2 0,
1 -2 0, 1 2 0, -1 2 0 ] } coordIndex [ 0 1 2 3 -1]
texCoord TextureCoordinate {point [0 0, 1 0, 1 1, 0 1] }}
}
Shape {appearance Appearance {
material Material{diffuseColor 1 1 1}
texture ImageTexture { url "alien4.rgba" }}
geometry IndexedFaceSet { coord Coordinate{ point [ -1 -2 0,
1 -2 0, 1 2 0, -1 2 0 ] } coordIndex [ 0 1 2 3 -1]
texCoord TextureCoordinate {point [0 0, 1 0, 1 1, 0 1] }}
}
Shape {appearance Appearance {
material Material{diffuseColor 1 1 1}
texture ImageTexture { url "alienboom1.rgba" }}
geometry IndexedFaceSet { coord Coordinate{ point [ -1 -2 0,
1 -2 0, 1 2 0, -1 2 0 ] } coordIndex [ 0 1 2 3 -1]
texCoord TextureCoordinate {point [0 0, 1 0, 1 1, 0 1] }}
}
Shape {
appearance Appearance {
material Material{diffuseColor 1 1 1}
texture ImageTexture { url "alienboom2.rgba" }
}
geometry IndexedFaceSet {
coord Coordinate{
point [ -1 -2 0, 1 -2 0, 1 2 0, -1 2 0 ]
}
coordIndex [ 0 1 2 3 -1]
texCoord TextureCoordinate {point [0 0, 1 0, 1 1, 0 1] }
}
}
Shape {
appearance Appearance {
material Material{diffuseColor 1 1 1}
texture ImageTexture { url "alienboom3.rgba" }
}
geometry IndexedFaceSet {
coord Coordinate{
point [ -1 -2 0, 1 -2 0, 1 2 0, -1 2 0 ]
}
coordIndex [ 0 1 2 3 -1]
texCoord TextureCoordinate {point [0 0, 1 0, 1 1, 0 1] }
}
}
Shape {
appearance Appearance {
material Material{diffuseColor 1 1 1}
texture ImageTexture { url "alienboom4.rgba" }
}
geometry IndexedFaceSet {
coord Coordinate{
point [ -1 -2 0, 1 -2 0, 1 2 0, -1 2 0 ]
}
coordIndex [ 0 1 2 3 -1]
texCoord TextureCoordinate {point [0 0, 1 0, 1 1, 0 1] }
}
}
]
whichChoice 1
}
]
}
DEF clock TimeSensor {
loop TRUE
cycleInterval 60
startTime .2
}
DEF spinner OrientationInterpolator{
key [ 0, .25, .5, .75, 1]
keyValue [0 1 0 0, 0 1 0 3.1415, 0 1 0 6.28, 0 1 0 9.42, 0 1 0 12.56]
}
DEF blinker Cycle{
max 2
speed 10
}
DEF control1 AlienControl {
start 0 2 -42
}
DEF control2 AlienControl {
start 1 2 -40
}
DEF control3 AlienControl {
start -1 2 -38
}
DEF control4 AlienControl {
start -2 2 -44
}
Sound {
source
DEF peace1 AudioClip {
url "peace.aiff"
}
}
Sound {
source
DEF splat1 AudioClip{
url "splat.aiff"
}
}
Sound {
source
DEF splat2 AudioClip {
url "splat.aiff"
}
}
Sound {
source
DEF splat3 AudioClip {
url "splat.aiff"
}
}
Sound {
source
DEF splat4 AudioClip {
url "splat.aiff"
}
}
ROUTE control1.startTime TO peace1.startTime
ROUTE Alien1Hit.touchTime TO splat1.startTime
ROUTE Alien2Hit.touchTime TO splat2.startTime
ROUTE Alien3Hit.touchTime TO splat3.startTime
ROUTE Alien4Hit.touchTime TO splat4.startTime
ROUTE Alien1Hit.isActive TO control1.shot
ROUTE control1.position TO Alien1Move.set_translation
ROUTE control1.which TO Alien1.whichChoice
ROUTE Alien2Hit.isActive TO control2.shot
ROUTE control2.position TO Alien2Move.set_translation
ROUTE control2.which TO Alien2.whichChoice
ROUTE Alien3Hit.isActive TO control3.shot
ROUTE control3.position TO Alien3Move.set_translation
ROUTE control3.which TO Alien3.whichChoice
ROUTE Alien4Hit.isActive TO control4.shot
ROUTE control4.position TO Alien4Move.set_translation
ROUTE control4.which TO Alien4.whichChoice
ROUTE blinker.which TO Light1.whichChoice
ROUTE blinker.which TO Light2.whichChoice
ROUTE clock.fraction_changed TO spinner.set_fraction
ROUTE spinner.value_changed TO SpaceShip.set_rotation